#include<string>
#include<iostream>
#include<vector>
// #include"logger.hpp"
class stringsplit{
    public:
    //k=v&
    //..music。。。#。pop
    static size_t split (const std::string& input,std::vector<std::string>* output,const std::string& sep){
        output->clear();
        size_t left = 0,right= 0;
        while(right < input.size()){
            right = input.find(sep,left);
            if(right == std::string::npos) {
                if(left < input.size())
                    output->push_back(input.substr(left));
                break;
            }
            if(right == left){
                left = right + sep.size();
                continue;
            }
            output->push_back(input.substr(left,right-left));
            left = right + sep.size();
        }
        return output->size();
    }   
};

int main(){
    const std::string input = "##..music..#..pop..lloas..zx#csa##..";
    std::vector<std::string> output;
    size_t size = stringsplit::split(input,&output,".");
    std::cout<<size<<std::endl;

    for(auto& e: output){
        std::cout<<e.c_str()<<std::endl;
    }
    return 0;
}